The present disclosure relates to a method for producing semiconductor layers and coated substrates treated with elemental selenium and/or sulphur, in particular flat substrates, containing at least one conducting, semiconducting, and/or insulating layer, in which a substrate that is provided with at least one metal layer and/or with at least one layer containing metal, in particular a stack of substrates, each of which is provided with at least one metal layer and/or with at least one layer that contains metal, is inserted into a processing chamber and heated to a predetermined substrate temperature.